cognizence of offence by magistrate